<div id="view<?php echo $uniqid;?>" style="padding-top: 20px; padding-bottom: 20px;" class="dianpuApplyView">
    <table>
        <tr>
            <td colspan="2" class="header">申请人信息</td>
        </tr>
        <tr>
            <td><label>店铺申请ID：</label><span>{{params.id}}</span></td>
            <td><label>申请人ID：</label><span>{{params.member_id}}</span></td>
        </tr>
        <tr>
            <td><label>申请人昵称：</label><span>{{params.member?params.member.nickname:'暂无'}}</span></td>
            <td><label>申请人电话：</label><span>{{params.member?params.member.phone:'暂无'}}</span></td>
        </tr>
        <tr>
            <td colspan="2" class="header">申请审核信息</td>
        </tr>
        <tr>
            <td colspan="2" style="line-height: 24px;">
                <label>审核状态：</label><span>{{params.status_name}}</span>
                <template v-if="params.status === -1">
                    <br><label>拒绝理由：</label><span>{{params.reason}}</span>
                    <br><label>拒绝时间：</label><span>{{params.reason_time}}</span><label style="margin-left: 10px;">操作人：</label><span>{{params.reason_user_name}}</span>
                </template>
                <template v-if="params.status === 1">
                    <br><label>店铺ID：</label><span>{{params.dianpu.id}}</span>
                </template>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="header">代理费信息</td>
        </tr>
        <tr>
            <td><label>代理费：</label><span>{{params.agent_fee}}</span></td>
            <td><label>支付状态：</label><span>{{params.pay_status_name}}</span></td>
        </tr>
        <tr v-if="params.agent_fee_pay_status !== 0">
            <td><label>支付方式：</label><span>{{params.agent_fee_payed_id === -1?'线下支付':'订单支付'}}</span></td>
            <td v-if="params.agent_fee_payed_id > 0"><label>支付订单Id：</label><span>{{params.agent_fee_payed_id}}</span></td>
            <td v-else></td>
        </tr>
        <tr>
            <td colspan="2" class="header">企业信息</td>
        </tr>
        <tr>
            <td><label>企业名称：</label><span>{{params.company_name}}</span></td>
            <td><label>企业法人：</label><span>{{params.realname}}</span></td>
        </tr>
        <tr>
            <td><label>企业联系电话：</label><span>{{params.phone}}</span></td>
            <td><label>营业执照：</label><img :src="params.company_license_image" onclick="dianpuApplyImageDialog(0)" style="max-width: 100px; height: auto" /></td>
        </tr>
        <tr>
            <td colspan="2"><label>企业地址：</label><span>{{params.province_name}}{{params.city_name}}{{params.area_name}}{{params.address}}</span></td>
        </tr>
        <tr>
            <td><label>法人身份证人像面：</label><img :src="params.company_representative_idcard_front_image" onclick="dianpuApplyImageDialog(1)" style="max-width: 100px; height: auto" /></td>
            <td><label>法人身份证国徽面：</label><img :src="params.company_representative_idcard_reverse_image" onclick="dianpuApplyImageDialog(2)" style="max-width: 100px; height: auto" /></td>
<!--            <td><label>法人身份证手持照片：</label><img :src="params.company_representative_idcard_hand_image" onclick="dianpuApplyImageDialog(3)" style="max-width: 100px; height: auto" /></td>-->
        </tr>
        <tr>
            <td colspan="2" class="header">企业银行帐户信息</td>
        </tr>
        <tr>
            <td><label>开户行：</label><span>{{params.company_bank}}</span></td>
            <td><label>对公帐户名称：</label><span>{{params.company_bank_name}}</span></td>
        </tr>
        <tr>
            <td colspan="2"><label>帐号：</label><span>{{params.company_bank_card}}</span></td>
        </tr>

    </table>
</div>
<div id="dianpuapplyviewdlg" class="easyui-dialog" style="width:840px; height:520px;" title="信息框" closed="true"></div>
<script>
    var dianpuApplyViewVm = new Vue({
        el: '#view<?php echo $uniqid;?>',
        data: {
            params: JSON.parse('<?php echo addslashes($dataset);?>'),
        },
        methods: {
        }
    });
    var dianpuApplyImageDialog = function (mode = 0, e) {
        let title = '';
        if(mode === 0){
            title = '企业营业执照';
        }else if(mode === 1){
            title = '法定代表人身份证人像面';
        }else if(mode === 2){
            title = '法定代表人身份证国徽面';
        }else{
            title = '法定代表人手持身份证';
        }
        $("#dianpuapplyviewdlg").dialog({
            title: `${title}照片查看`,
            closed: false,
            width: 640,
            height: 600,
            cache: false,
            href: `/admin/dianpuapply/showpic?id=${dianpuApplyViewVm.params.id}&mode=${mode}`,
            modal: true,
            buttons: [{
                text: '关闭',
                iconCls: 'icon-no',
                handler: function () {
                    $("#dianpuapplyviewdlg").dialog('close');
                }
            }]
        });

    }
</script>
<style>
    .dianpuApplyView table{
        width: 90%;
        margin:0 auto;
        border-top: 1px solid #cecece;
        border-left: 1px solid #cecece;
    }
    .dianpuApplyView table td{
        width: 50%;
        padding: 0 10px;
        line-height: 38px;
        border-right: 1px solid #cecece;
        border-bottom: 1px solid #cecece;
    }

    .dianpuApplyView table td.header{
        font-size: 1.1em;
        font-weight: bold;
        background-color: #d7d7d7;
    }
</style>
